/**
 * Created by Ysssssss on 2021/5/21.
 */
import apiType, {GET_SHOPPING_MALL_DESIGN_INFO, GET_SHOPPING_MALL_SETTINGS} from "@constants/ActionTypes";

const initialState = {
    shoppingMallSettings: {},
    shoppingMallDesign: {}
}

export default function update(state = initialState, action) {
    const {response, params, payload} = action

    switch (action.type) {
        case apiType(GET_SHOPPING_MALL_SETTINGS).success:
            return {
                ...state,
                shoppingMallSettings: response
            }
        case apiType(GET_SHOPPING_MALL_DESIGN_INFO).success:
            return {
                ...state,
                shoppingMallDesign: response
            }
        default:
            return state
    }
}